<template>
  <div class="header-tags-container hor-layout-center">
    <div class="header-tags-layout hor-layout-center">
      <el-tag class="header-tags-item" hit closable effect="dark"  type="success" size="medium" v-for="(item,index) in tagList" :key="index">{{ item }}
      </el-tag>
    </div>
    <el-button class="left-btn" size="small" type="primary" icon="el-icon-arrow-left"></el-button>
    <div class="right-btn-layout">
      <el-button size="small" type="primary" icon="el-icon-arrow-right"></el-button>
      <el-dropdown class="right-btn-close-view">
        <el-button size="small" type="primary" icon="el-icon-circle-close"></el-button>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item command="all">关闭所有</el-dropdown-item>
          <el-dropdown-item command="others">关闭其他</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>

<script>
export default {
  name: "tags-nav",
  data() {
    return {
      tagList: ["测试1", "测试2", "测试3", "测试4", "测试5", "测试6", "测试7", "测试8"
        // , "测试9", "测试10", "测试11", "测试12", "测试13", "测试14", "测试15",
      ]
    }
  }
}
</script>

<style scoped>
.header-tags-container {
  position: relative;
  padding: 6px 5px;
  background: #e2e8f0;
  border-bottom: 1px solid #c8c8c8;
  border-top: 1px solid #c8c8c8;
}

.header-tags-layout {
  margin-left: 50px;
  margin-right: 100px;
  overflow-x: auto;
  box-shadow: 0 1px 8px 0 hsla(0, 0%, 89%, .39);
}

.header-tags-layout::-webkit-scrollbar {
  width: 4px;
  height: 0px;
}

.header-tags-layout::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.header-tags-layout::-webkit-scrollbar-track {
  border-radius: 0;
  background: rgba(0, 0, 0, 0.1);
}

.header-tags-item {
  margin-left: 10px;
}

.left-btn {
  position: absolute;
  left: 7px;
}

.right-btn-layout {
  position: absolute;
  right: 7px;
}

.right-btn-close-view {
  margin-left: 5px;
}
</style>
